<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Microsoft.Samples.ServiceHosting.StorageClient.BlobContainer>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Container List
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<h2>
		Container List</h2>
	<table>
		<tr>
			<th>
			</th>
			<th>
				Name
			</th>
			<th>
				Last Modified Time
			</th>
			<th>
				Container Access Control
			</th>
		</tr>
		<% foreach (var item in Model)
		 { %>
		<tr>
			<td>
				<%= Html.ActionLink("Select", "Details", new { storageId = ViewData["storageId"], storageBoxId = item.ContainerName })%>
				|
				<%= Html.ActionLink("Delete", "DeleteContainer", new { storageId = ViewData["storageId"], storageBoxId = item.ContainerName }, new { onclick = "return confirm('Are you sure?')" })%>
			</td>
			<td>
				<%= Html.Encode(item.ContainerName) %>
			</td>
			<td>
				<%= Html.Encode(item.LastModifiedTime) %>
			</td>
			<td>
				<%=  Html.Encode(item.GetContainerAccessControl())%>
			</td>
		</tr>
		<% } %>
	</table>
	<p>
		<%= Html.ActionLink("Create New Container", "Create", new { storageId = ViewData["storageId"] })%>
		|
		<%= Html.ActionLink("Close", "List", "AzureStorage")%>
	</p>
</asp:Content>
